package com.qk.management.controller;

import com.qk.common.PageResult;
import com.qk.common.Result;
import com.qk.entity.OperateLog;
import com.qk.management.service.OperateLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/*
 *  @author SHCJ
 *  @created 2025/10/17 19:45
 *  @description
 */
@RestController
public class OperateLogController {
    @Autowired
    private OperateLogService operateLogService;

//    分页列表查询
    @GetMapping("/logs")
    public Result selectByPage(
            @RequestParam(name = "page", defaultValue = "1") Integer page,
            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
            @RequestParam(name = "operateUserName", required = false) String operateUserName
    ) {
        return Result.success(operateLogService.selectByPage(page, pageSize, operateUserName));
    }
}
